#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include <QPropertyAnimation>

namespace Ui {
class BtForm;
}

class BtForm : public QWidget
{
    Q_OBJECT

public:
    explicit BtForm(QWidget *parent = nullptr);
    ~BtForm();

    void setIconAndText(const QString& btIcon, const QString& btText, int mid);
    void clearBackground();
    int getPageId();
    void showAnimation(bool isShow);
protected:
    virtual void mousePressEvent(QMouseEvent *event);
signals:
    void btClick(int id);
private:
    Ui::BtForm *ui;
    int pageId;
    // 竖线动画效果
    QPropertyAnimation* animationLine1;
    QPropertyAnimation* animationLine2;
    QPropertyAnimation* animationLine3;
    QPropertyAnimation* animationLine4;
};

#endif // BTFORM_H
